<div id="From-other-version-control-systems"></div>
<div class="header">
<p>
Next: [[cvs: Creating a directory tree from scratch#Creating a directory tree from scratch|From scratch]], Previous: [[cvs: Creating a directory tree from a number of files#Creating a directory tree from a number of files|From files]], Up: [[cvs: Setting up the files#Setting up the files|Setting up the files]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Creating-Files-From-Other-Version-Control-Systems"></div>
==== Creating Files From Other Version Control Systems ====
<div id="index-Importing-files_002c-from-other-version-control-systems"></div>

If you have a project which you are maintaining with
another version control system, such as <small>RCS</small>, you
may wish to put the files from that project into
<small>CVS</small>, and preserve the revision history of the
files.

<div id="index-RCS_002c-importing-files-from"></div>
;From RCS
: If you have been using <small>RCS</small>, find the <small>RCS</small> files&mdash;usually a file named &lsquo;<tt>foo.c</tt>&rsquo; will have its <small>RCS</small> file in &lsquo;<tt>RCS/foo.c,v</tt>&rsquo; (but it could be other places; consult the <small>RCS</small> documentation for details).  Then create the appropriate directories in <small>CVS</small> if they do not already exist.  Then copy the files into the appropriate directories in the <small>CVS</small> repository (the name in the repository must be the name of the source file with &lsquo;<code>,v</code>&rsquo; added; the files go directly in the appropriate directory of the repository, not in an &lsquo;<tt>RCS</tt>&rsquo; subdirectory).  This is one of the few times when it is a good idea to access the <small>CVS</small> repository directly, rather than using <small>CVS</small> commands.  Then you are ready to check out a new working directory.

: The <small>RCS</small> file should not be locked when you move it into <small>CVS</small>; if it is, <small>CVS</small> will have trouble letting you operate on it.

;From another version control system
: Many version control systems have the ability to export <small>RCS</small> files in the standard format.  If yours does, export the <small>RCS</small> files and then follow the above instructions.

: Failing that, probably your best bet is to write a script that will check out the files one revision at a time using the command line interface to the other system, and then check the revisions into <small>CVS</small>. The &lsquo;<tt>sccs2rcs</tt>&rsquo; script mentioned below may be a useful example to follow.

<div id="index-SCCS_002c-importing-files-from"></div>
;From SCCS
: There is a script in the &lsquo;<tt>contrib</tt>&rsquo; directory of the <small>CVS</small> source distribution called &lsquo;<tt>sccs2rcs</tt>&rsquo; which converts <small>SCCS</small> files to <small>RCS</small> files. Note: you must run it on a machine which has both <small>SCCS</small> and <small>RCS</small> installed, and like everything else in contrib it is unsupported (your mileage may vary).

<div id="index-PVCS_002c-importing-files-from"></div>
;From PVCS
: There is a script in the &lsquo;<tt>contrib</tt>&rsquo; directory of the <small>CVS</small> source distribution called &lsquo;<tt>pvcs_to_rcs</tt>&rsquo; which converts <small>PVCS</small> archives to <small>RCS</small> files. You must run it on a machine which has both <small>PVCS</small> and <small>RCS</small> installed, and like everything else in contrib it is unsupported (your mileage may vary).  See the comments in the script for details.


----

<div class="header">
<p>
Next: [[cvs: Creating a directory tree from scratch#Creating a directory tree from scratch|From scratch]], Previous: [[cvs: Creating a directory tree from a number of files#Creating a directory tree from a number of files|From files]], Up: [[cvs: Setting up the files#Setting up the files|Setting up the files]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
